import request from '@/utils/request'

// 查询报价单列表
export function listPrice(query) {
  return request({
    url: '/sales/price/list',
    method: 'get',
    params: query
  })
}
export function listRules(query) {
  return request({
    url: '/sales/price/listRules',
    method: 'get',
    params: query
  })
}

// 查询报价单详细
export function getPrice(id) {
  return request({
    url: '/sales/price/' + id,
    method: 'get'
  })
}// 查询报价单详细

export function getInfoByDh(bjdh) {
  return request({
    url: '/sales/price/getInfoByDh/' + bjdh,
    method: 'get'
  })
}

// 新增报价单
export function addPrice(data) {
  return request({
    url: '/sales/price',
    method: 'post',
    data: data
  })
}

// 修改报价单
export function updatePrice(data) {
  return request({
    url: '/sales/price',
    method: 'put',
    data: data
  })
}

// 修改报价单
export function updatIshs(data) {
  return request({
    url: '/sales/price/updatIshs',
    method: 'get',
    params: data
  })
}


export function genScht(data) {
  return request({
    url: '/sales/price/scht/' + data,
    method: 'get'
  })
}
export function genBjNumber() {
  return request({
    url: '/sales/price/genBjNumber',
    method: 'get'
  })
}

// 删除报价单
export function delPrice(id) {
  return request({
    url: '/sales/price/' + id,
    method: 'delete'
  })
}

export function addBZItemInfo(ids) {
  return request({
    url: '/base/itembzinfo/addbzItemInfo/' + ids,
    method: 'get'
  })
}
